//
//  MFWTask.m
//  MFWSdk
//
//  Created by Song Xiaofeng on 13-9-10.
//  Copyright (c) 2013年 Mafengwo Inc. All rights reserved.
//

#import "MFWTask.h"

@implementation MFWTask

- (void)cancel;
{
    
}

- (BOOL)isEqual:(id)object
{
    if (object && [object isKindOfClass:[MFWTask class]])
    {
        MFWTask *task = (MFWTask*)object;
        return [self.dataIdentifier isEqual:task.dataIdentifier] && self.dataRequestType == task.dataRequestType;
    }
    return NO;
}
@end


@implementation MFWTask(RelativeData)
- (id)relativeDataModel;
{
    return [[MFWDataCenter sharedInstance] dataModelForCategory:self.dataIdentifier.dataCategoryName];
}

- (MFWJson*)relativeModelJson;
{
    return [[self relativeDataModel] listJsonForDataId:self.dataIdentifier.dataId];
}
@end